<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="./dist/css/mui.css">
</head>

<body style="background-color: white;max-width: 414px;margin: auto;">
    <div class="goods-toShow">
        <div class="goods-img" style="width: 100%;padding: 10px;">
            <img width="100%" src="./images/shouye/goods/goods1/1.jpg" />
        </div>

        <div class="goods-desc" style="height: 30px;padding: 0px 30px 0px 30px;" >
        </div>

        <div class="goods-buyInfo" style="height:30px;padding: 0px 40px 0px 40px;;">
            <div style="float: left;">
                <div class="ToPrice"></div>
            </div>
        </div>

        <div class="toCart" style="width:100%;text-align:right;padding: 0 30px 0 30px;">
            <img width="30px;" src="./images/littcart.png">
        </div>
    </div>

    <div class="goods-toShow">
        <div class="goods-img" style="width: 100%;padding: 10px;">
            <img width="100%" src="./images/shouye/goods/goods1/1.jpg" />
        </div>

        <div class="goods-desc" style="height: 30px;padding: 0px 30px 0px 30px;" >
        </div>

        <div class="goods-buyInfo" style="height:30px;padding: 0px 40px 0px 40px;;">
            <div style="float: left;">
                <div class="ToPrice"></div>
            </div>
        </div>

        <div class="toCart" style="width:100%;text-align:right;padding: 0 30px 0 30px;">
            <img width="30px;" src="./images/littcart.png">
        </div>
    </div>


</body>


<script src="./dist/js/mui.js"></script>
<script src="./dist/myComponet/js/componetToPrice.js"></script>
<script src="./dist/myComponet/js/componetTextBreak.js"></script>
<script>
    window.onload = function(){
        var appandStr = '<span style="margin-left:20px;;font-size:12px;color: rgba(119,119,119,0.8);">205人想买</span>';
        var ToPrice = new componetToPrice(148,88,appandStr);
        var tipriceTemp= ToPrice.getTemp();
        var toprice= document.getElementsByClassName('ToPrice');
        for( var i=0 ;i<toprice.length;i++){
            toprice[i].innerHTML = tipriceTemp;
        }

        //文字换行省略号
        var str = '【好茶爱分享】 简约便携带（兰花云霄安溪铁观音）';
        var TextBreak = new componetTextBreak(1,16,20,str);
        var textbreakTemp= TextBreak.getTemp();
        var desc = document.getElementsByClassName('goods-desc');
        for( var i=0 ;i<desc.length;i++){
            desc[i].innerHTML = textbreakTemp;
        }
    }

</script>


</html>